package com.taplinker.client.im.protocol;

import java.util.Date;

import android.os.Handler;

public class TapLinkerMessage{
	private String id;
	private String messageId;
	private String conversationId;
    private Date sendTime;
    private String content;
    private long sendUserId;
    private String sendUser;
    private String sendVistor;
    private String type;
    private String icon;
    private boolean read;
    private boolean unarrived;
    private String status;
    private String localPath;
    private Boolean isDirty = true;
    private int loadPerecent;
    
    public int getLoadPerecent() {
		return loadPerecent;
	}
	public void setLoadPerecent(int loadPerecent) {
		this.loadPerecent = loadPerecent;
	}
	public Boolean getIsDirty() {
		return isDirty;
	}
	public void setIsDirty(Boolean isDirty) {
		this.isDirty = isDirty;
	}
	private String localUrl;
    
    public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	private Handler handler;
    
	public boolean isUnarrived() {
		return unarrived;
	}
	public void setUnarrived(boolean unarrived) {
		this.unarrived = unarrived;
	}
	public String getMessageId() {
		return messageId;
	}
	public void setMessageId(String messageId) {
		this.messageId = messageId;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public Date getSendTime() {
		return sendTime;
	}
	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getSendUser() {
		return sendUser;
	}
	public void setSendUser(String sendUser) {
		this.sendUser = sendUser;
	}
	public String getSendVistor() {
		return sendVistor;
	}
	public void setSendVistor(String sendVistor) {
		this.sendVistor = sendVistor;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public boolean getRead() {
		return read;
	}
	public void setRead(boolean read) {
		this.read = read;
	}
	public void setConversationId(String conversationId) {
		this.conversationId = conversationId;
	}
	public String getConversationId() {
		return conversationId;
	}
	
	public TapLinkerMessage() {
		super();
	}
	
	public TapLinkerMessage(String id, String conversationId, Date sendTime,
			String content, long sendUserId, String sendUser,
			String sendVistor, String type, boolean read) {
		super();
		this.id = id;
		this.conversationId = conversationId;
		this.sendTime = sendTime;
		this.content = content;
		this.sendUserId = sendUserId;
		this.sendUser = sendUser;
		this.sendVistor = sendVistor;
		this.type = type;
		this.read = read;
	}
	
	public TapLinkerMessage(MessageReceivedResponse res) {
		super();
		
		this.id = res.getId();
		this.conversationId = res.getConversationId();
		this.sendTime = res.getSendTime();
		this.content = res.getContent();
		this.type = res.getType();
		this.read = false;
		this.sendUserId = res.getSendUserId();
		this.sendUser = res.getSendUser();
		this.sendVistor = res.getSendVisitor();
		
	}
	
	public void setSendUserId(long sendUserId) {
		this.sendUserId = sendUserId;
	}
	public long getSendUserId() {
		return sendUserId;
	}
	public void setIcon(String icon) {
		this.icon = icon;
	}
	public String getIcon() {
		return icon;
	}
	public Handler getHandler() {
		return handler;
	}
	public void setHandler(Handler handler) {
		this.handler = handler;
	}
	public String getLocalPath() {
		return localPath;
	}
	public void setLocalPath(String localPath) {
		this.localPath = localPath;
	}
	public String getLocalUrl() {
		return localUrl;
	}
	public void setLocalUrl(String localUrl) {
		this.localUrl = localUrl;
	}

}
